package com.tyk.bookstore.back.product.model.result;


import com.tyk.bookstore.back.common.core.model.result.ResultEnum;

/**
 * @author tyk
 * @description 书籍异常枚举
 */
public enum BookResultEnum implements ResultEnum {

    BOOK_NOT_FOUND(3_05_01_01, "书籍不存在"),
    BOOK_ALREADY_EXISTS(3_05_01_02, "书籍已存在"),
    PART_BOOK_ALREADY_EXISTS(3_05_01_03, "部分书籍已存在"),
    BOOK_HAS_STOCK(3_05_01_03, "书籍任存在库存");
    private final String msg;
    private final Integer code;

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }

    BookResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
